package de.se2.sharebox.classes;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 *
 * @author Gruppe 10
 *
 */
public class InvitationJUnit
{
	private Invitation invitation;
	private UserAccount userAccount;
	private User invitedUser;
	private Folder folder;
	
	@Before
	public void setUp () 
	{
		userAccount = new UserAccount("Taty", "taty@test.de", "taty");
		invitedUser = new User();
		invitedUser.setUserAccount(new UserAccount("Jens", "jens@test.de", "jens"));
		folder = new Folder("Test2", userAccount);
		invitation = new Invitation();
	}

	@Test
	public void testSendInvitation () {
		assertTrue(invitation.sendInvitation(userAccount, invitedUser, folder));
	}
	
	@After
	public void resetGlobal () {
		invitation = null;
		userAccount = null;
		invitedUser = null;
		folder = null;
	}
}
